<cfcomponent>
	<cfsetting showdebugoutput="false" enablecfoutputonly="true" />

		<cfset application.name="SnipEx_v0001">
		<cfset this.sessionManagement="true">
		<cfset this.clientManagement="true">
		<cfset this.setClientCookies="true">
		<cfset this.loginstorage="session">
		<cfset this.clientstorage="cookie">
		<cfset this.applicationTimeout=CreateTimeSpan(0,8,0,0)>
		<cfset this.sessionTimeout=CreateTimeSpan(0,0,20,0)>
		<cfset this.setClientCookies = true>
		<cfset this.setDomainCookies = true>
		
	<cffunction name="onApplicationStart" returnType="boolean">
	   	<cfset application.rootID = "1" />
	   	<cfset application.servername = "SnipEx Server">	   	
	   	<cfset application.dsn = "SnipEx" />
	   	<cfset application.moderate = true /> <!--- If set to true, snippets will have to set the published to true manually --->
	   	<cfset application.canSubmit = true /> <!--- If set to true, snippets can be submitted to this server --->
	   	
	   	<cfreturn true />
	   	
	</cffunction>
	<cffunction name="onRequestStart">
		<cfif (IsDefined('url.init') OR NOT IsDefined('session.userid')) OR (IsDefined('session.userid') AND session.userid EQ '')>
			<cfset onSessionStart() />
		</cfif>
	</cffunction>
	<cffunction name="onSessionStart"> 
		<cfset session.userid = rereplacenocase(cgi.PATH_INFO,'/','','ALL') />
	</cffunction>
</cfcomponent>
